// ComTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "ComReader.h"
#include "LoopBuffer.h"

#define MAX_BUF_LEN 16 

int _tmain(int argc, _TCHAR* argv[])
{
	CComReader reader;
	INT32 nRetCode = reader.Start("COM4", 38400);
	if(!nRetCode)
		return -1;

	EulerAngle angle;

	while(reader.IsRunning())
	{
		if(!reader.Read(&angle))
		{
			continue;
		}

		printf("Read: %.2f	%.2f\n", angle.pitch, angle.roll);
	}

	return 0;
}

